package Test8;

public class Test {
    public static void main(String[] args) {

        //实例化矩形对象求面积
        Graph g= new Graph();
        g.setWidth(10);
        g.setChang(15.3);
        System.out.println("矩形的长为："+g.getChang()+"  宽为："+g.getWidth());
        System.out.println("矩形的面积为："+g.area());

        //实例化长方体对象求体积
        Orthogon o = new Orthogon();
        o.setChang(2);
        o.setHeight(3.2);
        o.setWidth(100);
        System.out.println("长方体的长为："+o.getChang()+"  宽为："+o.getWidth()+"  高为："+o.getHeight());
        System.out.println("长方体的体积为："+o.bulk());

    }
}
